#welcome
  a#logout.btn.blue(href='/logout') Logout

  - if (connect_error.length)
    .error= connect_error

  h2 Hey #{user.name}, what do you want to do next?
  .play_alone
    .player
      img(src= user.picture, alt= user.name)
    a.btn(href= '/game/single') Play alone

  .separator

  h2 Play against other people

  a.new_room.btn(href= '#') Create a room

  form.create_room(action= '/room', method= 'POST', class= error ? 'error' : '')
    a.btn.blue(href= '#') cancel
    br
    br
    - if (error.length)
      p= error
    input.text(type= 'text', name= 'room[name]', placeholder= 'room name')
    input.btn(type= 'submit', value= 'create')

  ul.rooms
    -each room, i in rooms
      li.room
        a.btn(href= '/game/' + room._id) play
        ul
          - if (room.players)
            - each player in room.players
              li.player
                img(src= player.img, width= '24px', height='24px')
            - for(var i = 0; i < 6 - room.players.length; i++)
              li.player.unknown ?
        strong= room.name || 'Room' + i
